<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
<title>匹配字符$的使用</title>
</head>
<body>
   <h3>行尾匹配字符$的使用</h3>
   <script type="text/javascript">
   <!-- 
      var reg_expression = /ft$/;
      var textString="mingrisoft";
      var result=reg_expression.test(textString);  //匹配时返回true,否则false
      document.write("<font size='+1'>"+result+"<br>");
      if(result){
          document.write("正则表达式/ft$/匹配字符串\""+ textString +"\".<br>");
      }
      else{
          alert("未找到匹配的模式!");
   }
   // -->
   </script>
</body>
</html>

